package com.sun.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sun.bean.Customer;
import com.sun.mapper.CustomerMapper;
import com.sun.service.CustomerService;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;


@Service
public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> implements CustomerService {


    @Cacheable(cacheNames = "customer:list")
    @Override
    public List<Customer> selectAllDataList() {
       return baseMapper.selectList(Wrappers.emptyWrapper());
    }
}
